package com.tzr.bean;

import java.util.Objects;

public class Weibo {
    private String uname;
    private String pinglun;
    private int zan;

    @Override
    public String toString() {
        return "Weibo{" +
                "uname='" + uname + '\'' +
                ", pinglun='" + pinglun + '\'' +
                ", zan='" + zan + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Weibo weibo = (Weibo) o;
        return Objects.equals(uname, weibo.uname) &&
                Objects.equals(pinglun, weibo.pinglun) &&
                Objects.equals(zan, weibo.zan);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uname, pinglun, zan);
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPinglun() {
        return pinglun;
    }

    public void setPinglun(String pinglun) {
        this.pinglun = pinglun;
    }

    public Weibo(String uname, String pinglun, int zan) {
        this.uname = uname;
        this.pinglun = pinglun;
        this.zan = zan;
    }

    public int getZan() {
        return zan;
    }

    public void setZan(int zan) {
        this.zan = zan;
    }

    public Weibo() {
    }
}
